{"ast":null,"code":"import _toConsumableArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"sx\"];\nimport { isPlainObject } from '@mui/utils';\nimport { propToStyleFunction } from '../getThemeValue';\nvar splitProps = function splitProps(props) {\n  var result = {\n    systemProps: {},\n    otherProps: {}\n  };\n  Object.keys(props).forEach(function (prop) {\n    if (propToStyleFunction[prop]) {\n      result.systemProps[prop] = props[prop];\n    } else {\n      result.otherProps[prop] = props[prop];\n    }\n  });\n  return result;\n};\nexport default function extendSxProp(props) {\n  var inSx = props.sx,\n    other = _objectWithoutPropertiesLoose(props, _excluded);\n  var _splitProps = splitProps(other),\n    systemProps = _splitProps.systemProps,\n    otherProps = _splitProps.otherProps;\n  var finalSx;\n  if (Array.isArray(inSx)) {\n    finalSx = [systemProps].concat(_toConsumableArray(inSx));\n  } else if (typeof inSx === 'function') {\n    finalSx = function finalSx() {\n      var result = inSx.apply(void 0, arguments);\n      if (!isPlainObject(result)) {\n        return systemProps;\n      }\n      return _extends({}, systemProps, result);\n    };\n  } else {\n    finalSx = _extends({}, systemProps, inSx);\n  }\n  return _extends({}, otherProps, {\n    sx: finalSx\n  });\n}","map":{"version":3,"names":["_extends","_objectWithoutPropertiesLoose","_excluded","isPlainObject","propToStyleFunction","splitProps","props","result","systemProps","otherProps","Object","keys","forEach","prop","extendSxProp","inSx","sx","other","finalSx","Array","isArray"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"sx\"];\nimport { isPlainObject } from '@mui/utils';\nimport { propToStyleFunction } from '../getThemeValue';\n\nconst splitProps = props => {\n  const result = {\n    systemProps: {},\n    otherProps: {}\n  };\n  Object.keys(props).forEach(prop => {\n    if (propToStyleFunction[prop]) {\n      result.systemProps[prop] = props[prop];\n    } else {\n      result.otherProps[prop] = props[prop];\n    }\n  });\n  return result;\n};\n\nexport default function extendSxProp(props) {\n  const {\n    sx: inSx\n  } = props,\n        other = _objectWithoutPropertiesLoose(props, _excluded);\n\n  const {\n    systemProps,\n    otherProps\n  } = splitProps(other);\n  let finalSx;\n\n  if (Array.isArray(inSx)) {\n    finalSx = [systemProps, ...inSx];\n  } else if (typeof inSx === 'function') {\n    finalSx = (...args) => {\n      const result = inSx(...args);\n\n      if (!isPlainObject(result)) {\n        return systemProps;\n      }\n\n      return _extends({}, systemProps, result);\n    };\n  } else {\n    finalSx = _extends({}, systemProps, inSx);\n  }\n\n  return _extends({}, otherProps, {\n    sx: finalSx\n  });\n}"],"mappings":";AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,6BAA6B,MAAM,yDAAyD;AACnG,IAAMC,SAAS,GAAG,CAAC,IAAI,CAAC;AACxB,SAASC,aAAa,QAAQ,YAAY;AAC1C,SAASC,mBAAmB,QAAQ,kBAAkB;AAEtD,IAAMC,UAAU,GAAG,SAAbA,UAAU,CAAGC,KAAK,EAAI;EAC1B,IAAMC,MAAM,GAAG;IACbC,WAAW,EAAE,CAAC,CAAC;IACfC,UAAU,EAAE,CAAC;EACf,CAAC;EACDC,MAAM,CAACC,IAAI,CAACL,KAAK,CAAC,CAACM,OAAO,CAAC,UAAAC,IAAI,EAAI;IACjC,IAAIT,mBAAmB,CAACS,IAAI,CAAC,EAAE;MAC7BN,MAAM,CAACC,WAAW,CAACK,IAAI,CAAC,GAAGP,KAAK,CAACO,IAAI,CAAC;IACxC,CAAC,MAAM;MACLN,MAAM,CAACE,UAAU,CAACI,IAAI,CAAC,GAAGP,KAAK,CAACO,IAAI,CAAC;IACvC;EACF,CAAC,C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